The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches, which in and of themselves may also be inventions. Additionally, function names used are generally descriptive of what the functions perform and may be replaced by a function having a different name but capable of performing the same tasks or steps.
In conventional database systems, users access their data resources in one logical database. A user of such a conventional system typically retrieves data from and stores data on the system using the user's own systems. A user system might remotely access one of a plurality of server systems that might in turn access the database system. Data retrieval from the system might include the issuance of a query from the user system to the database system. The database system might process the request for information received in the query and send to the user system information relevant to the request. The rapid and efficient retrieval of accurate information and subsequent delivery of this information to the user system has been and continues to be a goal of administrators of database systems.
Unfortunately, conventional database approaches might process a query relatively slowly if, for example, optimizing queries involving OR expression filters are only applicable when each filter in the OR expression refers to the same logical data table. If a user runs a query with an OR expression where each term in the OR expression is optimizable and all the terms are based on the same query table, the query may be optimized. For example, if a user runs a query, “Select Id from Contact where Name=X or email=Y”, it may be optimized because all terms are based on the same query table. However, queries such as, “Select Id from Contact where Name=X or Account.Name=X” may be out of scope because the OR expression spans two query tables, contact and account. Developers may desire to be able to efficiently and dynamically optimize queries that reference multiple data tables and not be limited to optimizing queries of a single data table.
Accordingly, it is desirable to provide techniques enabling the optimization of queries involving multiple query tables to improve the performance and efficiency of the database system.